package cn.edu.ustc.xrovers.action;

import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import cn.edu.ustc.xrovers.model.NonFinancialInformation;
import cn.edu.ustc.xrovers.service.HandleCompanyInfoService;

import com.opensymphony.xwork2.ActionSupport;

public class CoNonFinInfoAction extends ActionSupport{

	private NonFinancialInformation nfi;
	private HandleCompanyInfoService hci;

	/**
	 * 保存企业非财务信息
	 * @return
	 * @throws Exception
	 */
	public String insertCoNonFinInfo() throws Exception {
		HttpSession session=ServletActionContext.getRequest().getSession();
		boolean flag=hci.saveCoNonFinInfo(session, nfi);
		if(flag)
			return SUCCESS;
		else
			return INPUT;
	}
	
	/**
	 * 保存担保企业非财务信息
	 * @return
	 * @throws Exception
	 */
	public String insertGuaNonFinInfo() throws Exception {
		HttpSession session=ServletActionContext.getRequest().getSession();
		boolean flag=hci.saveGuaNonFinInfo(session, nfi);
		if(flag)
			return SUCCESS;
		else
			return INPUT;
	}
	
	/*getset方法*/
	public void setNfi(NonFinancialInformation nfi) {
		this.nfi = nfi;
	}

	public NonFinancialInformation getNfi() {
		return nfi;
	}

	public void setHci(HandleCompanyInfoService hci) {
		this.hci = hci;
	}

	public HandleCompanyInfoService getHci() {
		return hci;
	}
}
